import request from '@/utils/request'
export default{
  //1.章节列表
  getBannerListPage(current,limit,bannerQuery){
    return request({
      // url: '/eduservice/teacher/pageTeacherCondition/'+current+"/"+limit,
      url: `/educms/bannerAdmin/pageBanner/${current}/${limit}`,
      method: 'post',
      //teacherQuery条件对象，后端使用requestBody获取数据
      data:bannerQuery
    })
  },
  removeDataById(id){
    return request({
      url: `/educms/bannerAdmin/deleteById/${id}`,
      method: 'delete',
    })
  },
  //添加幻灯片
  saveBanner(crmBanner){
    return request({
      url: `/educms/bannerAdmin/addBanner`,
      method: 'post',
      data:crmBanner
    })
  },
  //通过id查询幻灯片并回显
  getBannerById(id){
    return request({
      url: `/educms/bannerAdmin/get/${id}`,
      method: 'get',
    })
  },
  //修改幻灯片
  updateBannerInfo(crmBanner){
    return request({
      url: `/educms/bannerAdmin/updateById`,
      method: 'put',
      data:crmBanner
    })
  }
}
